#ifndef SHORT_MSG_H
#define SHORT_MSG_H

#include "MIDIMsg.h"    // For CMIDIMsg base class
#include "StdAfx.h"


namespace midi
{
    // Constants
    const DWORD SHORT_MSG_LENGTH = 3;


    //-----------------------------------------------------------------
    // CShortMsg class
    //
    // This class represents short MIDI messages.
    //-----------------------------------------------------------------

    class CShortMsg : public CMIDIMsg
    {
    public:
        CShortMsg(DWORD Msg, DWORD TimeStamp = 0);
        // Sends message
		void SendMsg(midi::CMIDIOutDevice &OutDevice){}

        DWORD GetLength() const
        { return midi::SHORT_MSG_LENGTH; }
        const char *GetMsg() const;
        unsigned char GetStatus() const;
        unsigned char GetChannel() const;
        unsigned char GetCommand() const;
        unsigned char GetData1() const;
        unsigned char GetData2() const;

        // Unpacks short messages
        static void UnpackShortMsg(DWORD Msg, unsigned char &Status,
                                   unsigned char &DataByte1,
                                   unsigned char &DataByte2);

        // Unpacks short channel messages
        static void UnpackShortMsg(DWORD Msg, unsigned char &Command,
                                   unsigned char &Channel,
                                   unsigned char &DataByte1,
                                   unsigned char &DataByte2);

    private:
        DWORD m_Msg;
        DWORD m_MsgNoStatus;
    };
}

#endif